from django.urls import path
from .views import (
    CommissionRuleListView, CommissionRuleDetailView,
    CommissionRecordListView, CommissionReportView,
    InvoiceListView, InvoiceDetailView, InvoiceCreateView,
    FinancialReportListView, FinancialReportDetailView,
    FinancialReportCreateView, PaymentTransactionListView,
    PaymentTransactionDetailView, revenue_report, expense_report,
    profit_report, payment_method_report, outstanding_invoices
)

urlpatterns = [
    path('commission-rules/', CommissionRuleListView.as_view(), name='commission-rule-list'),
    path('commission-rules/<int:pk>/', CommissionRuleDetailView.as_view(), name='commission-rule-detail'),
    path('commission-records/', CommissionRecordListView.as_view(), name='commission-record-list'),
    path('commission-report/', CommissionReportView.as_view(), name='commission-report'),
    
    path('invoices/', InvoiceListView.as_view(), name='invoice-list'),
    path('invoices/create/', InvoiceCreateView.as_view(), name='invoice-create'),
    path('invoices/<int:pk>/', InvoiceDetailView.as_view(), name='invoice-detail'),
    
    path('financial-reports/', FinancialReportListView.as_view(), name='financial-report-list'),
    path('financial-reports/create/', FinancialReportCreateView.as_view(), name='financial-report-create'),
    path('financial-reports/<int:pk>/', FinancialReportDetailView.as_view(), name='financial-report-detail'),
    
    path('payment-transactions/', PaymentTransactionListView.as_view(), name='payment-transaction-list'),
    path('payment-transactions/<int:pk>/', PaymentTransactionDetailView.as_view(), name='payment-transaction-detail'),
    
    path('reports/revenue/', revenue_report, name='revenue-report'),
    path('reports/expense/', expense_report, name='expense-report'),
    path('reports/profit/', profit_report, name='profit-report'),
    path('reports/payment-methods/', payment_method_report, name='payment-method-report'),
    path('reports/outstanding-invoices/', outstanding_invoices, name='outstanding-invoices'),
]
